/*
 *   A task scheduler that implements Monte-Carlo simulation
 *
 *   Copyright (C) 2011 Systasis Computer Systems, Inc.
 *
 *   This program is free software: you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation, either version 3 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *   
 *   $Id: ActivityJso.java 68 2011-08-01 22:22:17Z jchimene@gmail.com $
 */
package com.systasis.sked.client.model;

import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.core.client.JsArrayInteger;
import com.google.gwt.json.client.JSONObject;

public class ActivityJso extends JavaScriptObject implements Activity {
    protected ActivityJso() {
    }

    @Override
    public final String export() {
	return new JSONObject(this).toString();
    }

    @Override
    public final native String getActivityName()
    /*-{
    	return this.activityName;
    }-*/;

    @Override
    public final native double getBest()
    /*-{
    	return this.best;
    }-*/;

    @Override
    public final native int getId()
    /*-{
    	return this.id;
    }-*/;

    @Override
    public final native double getLikely()
    /*-{
    	return this.likely;
    }-*/;

    @Override
    public final native JsArrayInteger getPredecessorList()
    /*-{
    	return this.predecessorList;
    }-*/;

    @Override
    public final native double getWorst()
    /*-{
    	return this.worst;
    }-*/;

    @Override
    public final native void setActivityName(String activityName)
    /*-{
    	this.activityName = activityName;
    }-*/;

    @Override
    public final native void setBest(double best)
    /*-{
    	this.best = best;
    }-*/;

    @Override
    public final native void setId(int id)
    /*-{
    	this.id = id;
    }-*/;

    @Override
    public final native void setLikely(double likely)
    /*-{
    	this.likely = likely;
    }-*/;

    @Override
    public final native void setPredecessorList(JsArrayInteger predecessorList)
    /*-{
    	this.predecessorList = predecessorList;
    }-*/;

    @Override
    public final native void setWorst(double worst)
    /*-{
    	this.worst = worst;
    }-*/;
}
